3.9.11 \(\int \cos ^{\frac {7}{2}}(c+d x) (a+b \sec (c+d x))^3 \, dx\) [811]

Optimal. Leaf size=159 \[ \frac {2 b \left (9 a^2+5 b^2\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 a \left (5 a^2+21 b^2\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 a \left (5 a^2+21 b^2\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {32 a^2 b \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{35 d}+\frac {2 a^2 \cos ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x)) \sin (c+d x)}{7 d} \]

[Out]

2/5*b*(9*a^2+5*b^2)*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))/d+2/
21*a*(5*a^2+21*b^2)*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticF(sin(1/2*d*x+1/2*c),2^(1/2))/d+32
/35*a^2*b*cos(d*x+c)^(3/2)*sin(d*x+c)/d+2/7*a^2*cos(d*x+c)^(5/2)*(a+b*sec(d*x+c))*sin(d*x+c)/d+2/21*a*(5*a^2+2
1*b^2)*sin(d*x+c)*cos(d*x+c)^(1/2)/d

________________________________________________________________________________________

Rubi [A]
time = 0.20, antiderivative size = 159, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {4349, 3926, 4132, 3854, 3856, 2720, 4130, 2719} \begin {gather*} \frac {2 a \left (5 a^2+21 b^2\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 b \left (9 a^2+5 b^2\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 a \left (5 a^2+21 b^2\right ) \sin (c+d x) \sqrt {\cos (c+d x)}}{21 d}+\frac {32 a^2 b \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{35 d}+\frac {2 a^2 \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x))}{7 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^3,x]

[Out]

(2*b*(9*a^2 + 5*b^2)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*a*(5*a^2 + 21*b^2)*EllipticF[(c + d*x)/2, 2])/(21*d
) + (2*a*(5*a^2 + 21*b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (32*a^2*b*Cos[c + d*x]^(3/2)*Sin[c + d*x])
/(35*d) + (2*a^2*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(7*d)

Rule 2719

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{
c, d}, x]

Rule 2720

Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ
[{c, d}, x]

Rule 3854

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[Cos[c + d*x]*((b*Csc[c + d*x])^(n + 1)/(b*d*n)), x
] + Dist[(n + 1)/(b^2*n), Int[(b*Csc[c + d*x])^(n + 2), x], x] /; FreeQ[{b, c, d}, x] && LtQ[n, -1] && Integer
Q[2*n]

Rule 3856

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Dist[(b*Csc[c + d*x])^n*Sin[c + d*x]^n, Int[1/Sin[c + d
*x]^n, x], x] /; FreeQ[{b, c, d}, x] && EqQ[n^2, 1/4]

Rule 3926

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[a^2*Co
t[e + f*x]*(a + b*Csc[e + f*x])^(m - 2)*((d*Csc[e + f*x])^n/(f*n)), x] - Dist[1/(d*n), Int[(a + b*Csc[e + f*x]
)^(m - 3)*(d*Csc[e + f*x])^(n + 1)*Simp[a^2*b*(m - 2*n - 2) - a*(3*b^2*n + a^2*(n + 1))*Csc[e + f*x] - b*(b^2*
n + a^2*(m + n - 1))*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f}, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 2]
 && ((IntegerQ[m] && LtQ[n, -1]) || (IntegersQ[m + 1/2, 2*n] && LeQ[n, -1]))

Rule 4130

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[A*Cot[e
+ f*x]*((b*Csc[e + f*x])^m/(f*m)), x] + Dist[(C*m + A*(m + 1))/(b^2*m), Int[(b*Csc[e + f*x])^(m + 2), x], x] /
; FreeQ[{b, e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && LeQ[m, -1]

Rule 4132

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(
C_.)), x_Symbol] :> Dist[B/b, Int[(b*Csc[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x
]^2), x] /; FreeQ[{b, e, f, A, B, C, m}, x]

Rule 4349

Int[(u_)*((c_.)*sin[(a_.) + (b_.)*(x_)])^(m_.), x_Symbol] :> Dist[(c*Csc[a + b*x])^m*(c*Sin[a + b*x])^m, Int[A
ctivateTrig[u]/(c*Csc[a + b*x])^m, x], x] /; FreeQ[{a, b, c, m}, x] &&  !IntegerQ[m] && KnownSecantIntegrandQ[
u, x]

Rubi steps

\begin {align*} \int \cos ^{\frac {7}{2}}(c+d x) (a+b \sec (c+d x))^3 \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {(a+b \sec (c+d x))^3}{\sec ^{\frac {7}{2}}(c+d x)} \, dx\\ &=\frac {2 a^2 \cos ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x)) \sin (c+d x)}{7 d}+\frac {1}{7} \left (2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {8 a^2 b+\frac {1}{2} a \left (5 a^2+21 b^2\right ) \sec (c+d x)+\frac {1}{2} b \left (3 a^2+7 b^2\right ) \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\frac {2 a^2 \cos ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x)) \sin (c+d x)}{7 d}+\frac {1}{7} \left (2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {8 a^2 b+\frac {1}{2} b \left (3 a^2+7 b^2\right ) \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x)} \, dx+\frac {1}{7} \left (a \left (5 a^2+21 b^2\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sec ^{\frac {3}{2}}(c+d x)} \, dx\\ &=\frac {2 a \left (5 a^2+21 b^2\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {32 a^2 b \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{35 d}+\frac {2 a^2 \cos ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x)) \sin (c+d x)}{7 d}+\frac {1}{5} \left (b \left (9 a^2+5 b^2\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx+\frac {1}{21} \left (a \left (5 a^2+21 b^2\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\sec (c+d x)} \, dx\\ &=\frac {2 a \left (5 a^2+21 b^2\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {32 a^2 b \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{35 d}+\frac {2 a^2 \cos ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x)) \sin (c+d x)}{7 d}+\frac {1}{5} \left (b \left (9 a^2+5 b^2\right )\right ) \int \sqrt {\cos (c+d x)} \, dx+\frac {1}{21} \left (a \left (5 a^2+21 b^2\right )\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {2 b \left (9 a^2+5 b^2\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 a \left (5 a^2+21 b^2\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 a \left (5 a^2+21 b^2\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {32 a^2 b \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{35 d}+\frac {2 a^2 \cos ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x)) \sin (c+d x)}{7 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.49, size = 110, normalized size = 0.69 \begin {gather*} \frac {42 \left (9 a^2 b+5 b^3\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+10 \left (5 a^3+21 a b^2\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )+a \sqrt {\cos (c+d x)} \left (65 a^2+210 b^2+126 a b \cos (c+d x)+15 a^2 \cos (2 (c+d x))\right ) \sin (c+d x)}{105 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^3,x]

[Out]

(42*(9*a^2*b + 5*b^3)*EllipticE[(c + d*x)/2, 2] + 10*(5*a^3 + 21*a*b^2)*EllipticF[(c + d*x)/2, 2] + a*Sqrt[Cos
[c + d*x]]*(65*a^2 + 210*b^2 + 126*a*b*Cos[c + d*x] + 15*a^2*Cos[2*(c + d*x)])*Sin[c + d*x])/(105*d)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(420\) vs. \(2(195)=390\).
time = 0.19, size = 421, normalized size = 2.65

method result size
default \(-\frac {2 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (240 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+\left (-360 a^{3}-504 b \,a^{2}\right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (280 a^{3}+504 b \,a^{2}+420 b^{2} a \right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-80 a^{3}-126 b \,a^{2}-210 b^{2} a \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+25 a^{3} \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+105 b^{2} a \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-189 b \,a^{2} \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-105 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) b^{3}\right )}{105 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) \(421\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^(7/2)*(a+b*sec(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

-2/105*((2*cos(1/2*d*x+1/2*c)^2-1)*sin(1/2*d*x+1/2*c)^2)^(1/2)*(240*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^8*a^
3+(-360*a^3-504*a^2*b)*sin(1/2*d*x+1/2*c)^6*cos(1/2*d*x+1/2*c)+(280*a^3+504*a^2*b+420*a*b^2)*sin(1/2*d*x+1/2*c
)^4*cos(1/2*d*x+1/2*c)+(-80*a^3-126*a^2*b-210*a*b^2)*sin(1/2*d*x+1/2*c)^2*cos(1/2*d*x+1/2*c)+25*a^3*(sin(1/2*d
*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))+105*b^2*a*(sin(1/2*d
*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))-189*(sin(1/2*d*x+1/2
*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))*a^2*b-105*(sin(1/2*d*x+1/2
*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))*b^3)/(-2*sin(1/2*d*x+1/2*c
)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)/sin(1/2*d*x+1/2*c)/(2*cos(1/2*d*x+1/2*c)^2-1)^(1/2)/d

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(7/2)*(a+b*sec(d*x+c))^3,x, algorithm="maxima")

[Out]

integrate((b*sec(d*x + c) + a)^3*cos(d*x + c)^(7/2), x)

________________________________________________________________________________________

Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.74, size = 205, normalized size = 1.29 \begin {gather*} \frac {2 \, {\left (15 \, a^{3} \cos \left (d x + c\right )^{2} + 63 \, a^{2} b \cos \left (d x + c\right ) + 25 \, a^{3} + 105 \, a b^{2}\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 5 \, \sqrt {2} {\left (5 i \, a^{3} + 21 i \, a b^{2}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 5 \, \sqrt {2} {\left (-5 i \, a^{3} - 21 i \, a b^{2}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 21 \, \sqrt {2} {\left (-9 i \, a^{2} b - 5 i \, b^{3}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 21 \, \sqrt {2} {\left (9 i \, a^{2} b + 5 i \, b^{3}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{105 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(7/2)*(a+b*sec(d*x+c))^3,x, algorithm="fricas")

[Out]

1/105*(2*(15*a^3*cos(d*x + c)^2 + 63*a^2*b*cos(d*x + c) + 25*a^3 + 105*a*b^2)*sqrt(cos(d*x + c))*sin(d*x + c)
- 5*sqrt(2)*(5*I*a^3 + 21*I*a*b^2)*weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c)) - 5*sqrt(2)*(-5*I
*a^3 - 21*I*a*b^2)*weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c)) - 21*sqrt(2)*(-9*I*a^2*b - 5*I*b^
3)*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c))) - 21*sqrt(2)*(9*I*a^2*b +
 5*I*b^3)*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c))))/d

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**(7/2)*(a+b*sec(d*x+c))**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(7/2)*(a+b*sec(d*x+c))^3,x, algorithm="giac")

[Out]

integrate((b*sec(d*x + c) + a)^3*cos(d*x + c)^(7/2), x)

________________________________________________________________________________________

Mupad [B]
time = 1.22, size = 146, normalized size = 0.92 \begin {gather*} \frac {2\,\left (b^3\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )+a\,b^2\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )+a\,b^2\,\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (c+d\,x\right )\right )}{d}-\frac {2\,a^3\,{\cos \left (c+d\,x\right )}^{9/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {9}{4};\ \frac {13}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{9\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {6\,a^2\,b\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^(7/2)*(a + b/cos(c + d*x))^3,x)

[Out]

(2*(b^3*ellipticE(c/2 + (d*x)/2, 2) + a*b^2*ellipticF(c/2 + (d*x)/2, 2) + a*b^2*cos(c + d*x)^(1/2)*sin(c + d*x
)))/d - (2*a^3*cos(c + d*x)^(9/2)*sin(c + d*x)*hypergeom([1/2, 9/4], 13/4, cos(c + d*x)^2))/(9*d*(sin(c + d*x)
^2)^(1/2)) - (6*a^2*b*cos(c + d*x)^(7/2)*sin(c + d*x)*hypergeom([1/2, 7/4], 11/4, cos(c + d*x)^2))/(7*d*(sin(c
 + d*x)^2)^(1/2))

________________________________________________________________________________________